<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>

</head>
<body class="nihilo">
<div style="width:300px;height:300px;float:right">
<div dojoType="dijit.TitlePane" open="false" title="功能说明" >
		<p>
		网站信息全局变量。支持自定义变量。
		<br><br>规则：变量命名要求符合正则表达式 ^[A-Za-z_]{1}[A-Za-z0-9_]*。
		<br>
		</p>
			  
	</div>
	<div dojoType="dijit.TitlePane" open="false" title="如何使用">
	<p>
	举例：
	<br><br>
	<? highlight_string('<?php 
$GLOBALS ["gSiteInfo"] ["title"] =  "欢迎访问";
	?>') ?>
		
		<br><br>可以在模板中直接使用$title;
		</p>
</div>
</div>

<div style="height:50px;">
	<div style="margin:10px;">位置: 配置管理 > 网站信息</div>
	<div style="margin:10px;">
		<button dojoType="dijit.form.Button" onclick="addRow('website_table');">新增</button>
	</div>
</div>

<div method="" jsid="website_form" id="website_form" dojoType="dijit.form.Form" action="" >

 <script type="dojo/method" event="onSubmit">
		
 		if (this.validate()) {
        	submitForm("website_form");
            return false;
        } else {
            return false;
        }
       
    </script>
<input type="hidden" name="action" value="setting">
<input type="hidden" name="op" value="save">
<input type="hidden" name="set_type" value="<?=$set_type?>">
<table style="width:600px;margin:10px">
<thead>
<tr >
<td style="border-bottom:1px solid #ccc;width:150px;background-color:#eee">变量</td>
<td style="border-bottom:1px solid #ccc;width:300px;background-color:#eee">值</td>
<td style="border-bottom:1px solid #ccc;width:150px;background-color:#eee">操作</td>
</tr>
</thead>
<tbody id="website_table">
<?php foreach($items as $item){?>
<tr id="row_<?=$item['name']?>">
<td><?=$item['name']?><input type="hidden" name="name_<?=$item['name']?>" value="<?=$item['name']?>"></td>
<td><input dojoType="dijit.form.TextBox" type="text" name="valu_<?=$item['name']?>" id="valu_<?=$item['name']?>" value="<?=$item['value']?>"></td>
<td><button dojoType="dijit.form.Button" onclick="deleteRow('website_table','row_<?=$item['name']?>');">删除</button></td>
</tr>
<? }?>
</tbody>
<tfoot>
<tr>
     <td colspan="2" align="center">
       <button dojoType="dijit.form.Button" type="submit">保存</button>
       <button dojoType="dijit.form.Button" type="reset">重置</button>
       </td>
   </tr>
 </tfoot>
</table>
</div>

</body>
</html>